package main

import (
	"fmt"
	"net/http"
	"runtime"
)

func indexHandler(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("version", runtime.Version())
	fmt.Fprintf(w, "hello world")
}

func main() {
	fmt.Println(runtime.Version())
	http.HandleFunc("/", indexHandler)
	http.HandleFunc("/healthz", func (w http.ResponseWriter, r *http.Request){
			w.Header().Set("code", "200")
			w.WriteHeader(200)
			w.Write([]byte("code 200\n"))
		})
	http.ListenAndServe(":8080", nil)

}
